

function loadTypes(container)
{ 
	$.post("goodslist!getAllCategory.action",{},function(data){ 
		data = $.toJSON(data);  
		$(container).html("").append(foreachHandler(eval(data),function(item){ 
			return '<option value="'+item.categoryId+'">'+item.categoryName+'</option>';
		})); 
	},"json");
}

function loadGoodsByCategoryId(container,categoryId)
{ 
	$.post("infolist!getGoodsByCategory.action",{"categoryId":categoryId},function(data){ 
		data = $.toJSON(data);  
	  
		$(container).html("").append(foreachHandler(eval(data),function(item){ 
			return '<option value="'+item.goodId+'">'+item.goodName+'</option>';
		})); 
	},"json");
}
